<?php
/*  Copyright 2011  Jacob Brunson  (email : wp-jacob.gpl.license@jacobbrunson.com )

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

/**
 * The Photo-Server has one or more sources of Photos.  Each source is defined
 * and configured through a class that implementes this PhotoSource_I
 * interface.
 */
interface PhotoSource_I {

    public function __construct(Site $site, $directory);

    public function getAlbum($id);

    public function getPhoto($id);

    public function getDefaultAlbum();
}

/**
 * Each photo source contains one or more groups of photos.  This Photo-Server
 * used the keyword "Album" to describe each group, collection, directory, etc
 * that the photo source provides.  A photo source is expected to provide a
 * class that implements this Album_I interface for access to the photo group.
 */
interface Album_I {

    /**
     * @returns a human-readable string which is the name or title of the album
     */
    public function getTitle();

    /**
     * Gets the identifier for album.  This identifier must be unique in the
     * album, and may be a string or integer.
     * @returns mixed unique string or integer
     */
    public function getId();

    /**
     * @returns instantiated object implementing Album_I or NULL
     */
    public function getNextSubAlbum();

    /**
     * @returns instantiated object implementing Photo_I or NULL
     */
    public function getNextPhoto();
}


interface Photo_I {

    public function getTitle();

    public function getId();

}

interface HttpPhoto_I extends Photo_I {
    public function getURL(Dims $size);    
}

interface UriPhoto_I extends Photo_I {
    public function getPath();    
}

interface UriMovie_I extends Photo_I {
    public function getPath();    
}

